package tt.dz.entity.charger;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import tt.dz.entity.base.OmsDeviceType;
import tt.dz.entity.base.OmsPubWhitelist;
import tt.dz.entity.base.OmsSplitratioScheme;
import tt.dz.entity.dic.OmsDicForwardSrvInfo;
import tt.dz.util.annotation.Ignore;
import tt.dz.util.annotation.PrimaryKey;
import tt.dz.util.annotation.Table;

/**
 * 电桩基础信息表
 * 
 * @author pengyu
 * 
 */
@Table(name = "oms_charger")
public class OmsCharger implements Serializable, Cloneable  {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1218349197650694596L;
	
	/** 设备信息,前四位是区号+第五位是3代表3.0版本。后面的11位是从10开始自增的 */
	@PrimaryKey
	private String charger_id;
	private String station_id;
	/** 二维码标识 */
	private String qr_code;
	/** 1--直流 2--交流 3--混合 */
	private Integer charger_type;
	/** 接口数量 1：单枪、2：双枪 */
	private Integer port_quantity;
	/** 枪 端口例如12315 */
	@Ignore
	private Integer port;
	/** port_no 接口序号,从0开始;,3.0版本新增,对应充电口号 */
	@Ignore
	private Integer port_no;
	/**多枪是否可以同时充电：1为可以，0为不行，默认为1   */
	private Integer is_parallel_charge;
	/** 充电接口类型：\r\n 1.国标；\r\n 2特斯拉；\r\n 3.ABB，\r\n 4其他 */
	@Ignore
	private Integer charge_port_type;
	/** 设备信息;GPRS桩专用 */
	private Integer forward_srv_id;
	/** 充电运营服务商ID */
	private String oper_merchant_id;
	private String entity_type;//0：独立存在(平台管理员)；1：运营商；2：运营商分支机构；3：厂商；4：合作商（例如五十所）。
	private String entity_id;//归属实体id
	/** 0 不可用，1：可用 ;在线桩专用 */
	private Integer wifi_ap;
	/** 安装时间 */
	private Date installation_time;
	/** GPRS信号卡号，由业务规则按一定规律生成 */
	private String card_gprs;
	/** GPRS桩专用，由业务规则按一定规律生成 */
	private String card_wifi;
	/** 所在地电桩桩号，由业务规则按一定规律生成 */
	private String serial_no;
	/** 生产厂商 */
	private String factory_id;
	/** 生产厂商 */
	private String device_id;
	/** 出厂序列号 */
	private String dev_sn;
	/** 软件版本 */
	private String software_version;
	/** 第三方指令集序号，当桩对应协议为第三方协议即协议类型为2时，此字段不能为空 */
	private String instruction_set_no;
	/** 城市代码 */
	private String city_code;
	/** 城市名称 */
	private String district_name;
	/** 备注：预留 */
	private String charger_ip;
	/** 0-在线桩（GPRS桩）,1-离线桩（蓝牙桩） */
	@Ignore
	private Integer connect_type;
	/** 0 不加密 ;1 DES ;2 3DES; 3 AES;4 MD5 */
	private Integer encrypt_type;
	private String comm_key;
	/** 0为未激活，1为已激活;蓝牙桩专用 */
	private Integer active_flag;
	/** 蓝牙桩专用id */
	private String ssid;
	/** 协议名称 1：EV3C；2：Protocol Translate；3 P2P */
	private String protocol_type;
	/** 通讯协议版本号 */
	private String protocol_version;
	/** 预约费费率方案号 */
	private Integer rate_schema_bespeak_fee;	
	/** 电费费率方案号 */
	private Integer rate_schema_charge_fee;
	/** 服务费费率方案号 */
	private Integer rate_schema_service_fee;
	/** 电费归属运营服务商ID */
	private String fee_oper_merchant_id;
	/* 是否允许桩生成费用,0：不允许；1：允许 */
	private Integer is_allow_generate_fee;
	/* 桩是否对外开放,,0：不允许；1：允许 */
	private Integer is_allow_open;
	/** 创建时间 */
	private Date create_time;
	/** 创建人ID，如果为0000000000为非真实数据。 */
	private String create_oper_id;
	/** 更新时间 */
	private Date update_time;
	/** 更新人id */
	private String update_oper_id;
	private Integer valid_flag;
	//电桩状态； 0: 空闲;1: 预约;2 充电; 3 故障,10:离线，本字段不在电桩表中，是参考状态表中charge_status与online_status结合而成
	@Ignore
	private Integer charge_status;
	//如果是 1: 预约;2 充电 ，就记录其开始时间和卡号,参考充电费用表和预约费用表
	@Ignore
	private Date charge_status_start_time;
	//如果桩为离线状态online_status 就记录last_connect_time，记录和当前时间的差值 时分秒，传给前台。
	@Ignore
	private String offline_time;
	@Ignore
	private String user_pay_card;
	//oms_charger_error_record[故障记录表]  故障说明 ，故障开始时间为故障表中create_time
	@Ignore
	private String error_msg;
	@Ignore
	private List<Integer> portStatusList;//桩每个充电口的状态：
	@Ignore
	private String splitratio_scheme_no;//分成方案号
	/**************20160325 perlin add begin**********************/
	@Ignore(isOtherTable=true)
	private String factory_name;//生产厂商名称
	@Ignore(isOtherTable=true)
	private String city_name;//城市名称
//	@Ignore(isOtherTable=true)
	private String station_name;//站点名称
	@Ignore
	private OmsDeviceType deviceType; // 设备详细类型	
	/**************20160325 perlin add end**********************/
	
	@Ignore
	private List<OmsChargerRate> bespeakRateList;//预约费率 
	@Ignore
	private List<OmsChargerRate> chargeServiceRateList;//充电服务费费率 
	@Ignore
	private List<OmsChargerRate> chargeRateList;//充电费率 
	@Ignore
	private OmsDicForwardSrvInfo omsDicForwardSrvInfo;//硬件服务器
	@Ignore
	private List<OmsSplitratioScheme> omsSplitratioSchemeList;//分成方案
	@Ignore
	private OmsDeviceType omsDeviceType;//设备信息
	@Ignore
	private List<OmsPubWhitelist> whitelist;//白名单列表
	@Ignore
	private String operName;//运营商名字
	@Ignore
	private String entityName;//所属实体名称
	@Ignore
	private String brand;//设备品牌
	
	public String getBrand() {
		return brand;
	}
	public void setBrand(String brand) {
		this.brand = brand;
	}
	public String getOperName() {
		return operName;
	}
	public void setOperName(String operName) {
		this.operName = operName;
	}
	public String getEntityName() {
		return entityName;
	}
	public void setEntityName(String entityName) {
		this.entityName = entityName;
	}
	public OmsCharger() {
		super();
	}
	public OmsCharger(String charger_id) {
		super();
		this.charger_id = charger_id;
	}
	
	
	public OmsDicForwardSrvInfo getOmsDicForwardSrvInfo() {
		return omsDicForwardSrvInfo;
	}
	public void setOmsDicForwardSrvInfo(OmsDicForwardSrvInfo omsDicForwardSrvInfo) {
		this.omsDicForwardSrvInfo = omsDicForwardSrvInfo;
	}
	public List<OmsChargerRate> getBespeakRateList() {
		return bespeakRateList;
	}
	public void setBespeakRateList(List<OmsChargerRate> bespeakRateList) {
		this.bespeakRateList = bespeakRateList;
	}
	public List<OmsChargerRate> getChargeServiceRateList() {
		return chargeServiceRateList;
	}
	public void setChargeServiceRateList(List<OmsChargerRate> chargeServiceRateList) {
		this.chargeServiceRateList = chargeServiceRateList;
	}
	public List<OmsChargerRate> getChargeRateList() {
		return chargeRateList;
	}
	public void setChargeRateList(List<OmsChargerRate> chargeRateList) {
		this.chargeRateList = chargeRateList;
	}
	 
	public List<OmsSplitratioScheme> getOmsSplitratioSchemeList() {
		return omsSplitratioSchemeList;
	}
	public void setOmsSplitratioSchemeList(List<OmsSplitratioScheme> omsSplitratioSchemeList) {
		this.omsSplitratioSchemeList = omsSplitratioSchemeList;
	}
	public OmsDeviceType getOmsDeviceType() {
		return omsDeviceType;
	}
	public void setOmsDeviceType(OmsDeviceType omsDeviceType) {
		this.omsDeviceType = omsDeviceType;
	}
	public List<OmsPubWhitelist> getWhitelist() {
		return whitelist;
	}
	public void setWhitelist(List<OmsPubWhitelist> whitelist) {
		this.whitelist = whitelist;
	}
	public String getFactory_name() {
		return factory_name;
	}

	public void setFactory_name(String factory_name) {
		this.factory_name = factory_name;
	}
	public String getCity_name() {
		return city_name;
	}
	public void setCity_name(String city_name) {
		this.city_name = city_name;
	}
	public String getStation_name() {
		return station_name;
	}
	public void setStation_name(String station_name) {
		this.station_name = station_name;
	}	
	public String getSplitratio_scheme_no() {
		return splitratio_scheme_no;
	}
	public void setSplitratio_scheme_no(String splitratio_scheme_no) {
		this.splitratio_scheme_no = splitratio_scheme_no;
	}
	public String getOffline_time() {
		return offline_time;
	}
	public void setOffline_time(String offline_time) {
		this.offline_time = offline_time;
	}
	public Date getCharge_status_start_time() {
		return charge_status_start_time;
	}
	public void setCharge_status_start_time(Date charge_status_start_time) {
		this.charge_status_start_time = charge_status_start_time;
	}
	public String getUser_pay_card() {
		return user_pay_card;
	}
	public void setUser_pay_card(String user_pay_card) {
		this.user_pay_card = user_pay_card;
	}
	public String getError_msg() {
		return error_msg;
	}
	public void setError_msg(String error_msg) {
		this.error_msg = error_msg;
	}
	public Integer getCharge_status() {
		return charge_status;
	}
	public void setCharge_status(Integer charge_status) {
		this.charge_status = charge_status;
	}
	public String getCharger_id() {
		return charger_id;
	}
	public void setCharger_id(String charger_id) {
		this.charger_id = charger_id;
	}
	public String getStation_id() {
		return station_id;
	}
	public void setStation_id(String station_id) {
		this.station_id = station_id;
	}
	public String getQr_code() {
		return qr_code;
	}
	public void setQr_code(String qr_code) {
		this.qr_code = qr_code;
	}
	public Integer getCharger_type() {
		return charger_type;
	}
	public void setCharger_type(Integer charger_type) {
		this.charger_type = charger_type;
	}
	public Integer getPort_quantity() {
		return port_quantity;
	}
	public void setPort_quantity(Integer port_quantity) {
		this.port_quantity = port_quantity;
	}
	public Integer getPort() {
		return port;
	}
	public void setPort(Integer port) {
		this.port = port;
	}
	public Integer getPort_no() {
		return port_no;
	}
	public void setPort_no(Integer port_no) {
		this.port_no = port_no;
	}
	public Integer getCharge_port_type() {
		return charge_port_type;
	}
	public void setCharge_port_type(Integer charge_port_type) {
		this.charge_port_type = charge_port_type;
	}
	 
	public Integer getForward_srv_id() {
		return forward_srv_id;
	}
	public void setForward_srv_id(Integer forward_srv_id) {
		this.forward_srv_id = forward_srv_id;
	}
	public String getOper_merchant_id() {
		return oper_merchant_id;
	}
	public void setOper_merchant_id(String oper_merchant_id) {
		this.oper_merchant_id = oper_merchant_id;
	}
	
	public String getEntity_type() {
		return entity_type;
	}
	public void setEntity_type(String entity_type) {
		this.entity_type = entity_type;
	}
	public String getEntity_id() {
		return entity_id;
	}
	public void setEntity_id(String entity_id) {
		this.entity_id = entity_id;
	}
	public Integer getWifi_ap() {
		return wifi_ap;
	}
	public void setWifi_ap(Integer wifi_ap) {
		this.wifi_ap = wifi_ap;
	}
	public Date getInstallation_time() {
		return installation_time;
	}
	public void setInstallation_time(Date installation_time) {
		this.installation_time = installation_time;
	}
	public String getCard_gprs() {
		return card_gprs;
	}
	public void setCard_gprs(String card_gprs) {
		this.card_gprs = card_gprs;
	}
	public String getCard_wifi() {
		return card_wifi;
	}
	public void setCard_wifi(String card_wifi) {
		this.card_wifi = card_wifi;
	}
	public String getSerial_no() {
		return serial_no;
	}
	public void setSerial_no(String serial_no) {
		this.serial_no = serial_no;
	}
	public String getFactory_id() {
		return factory_id;
	}
	public void setFactory_id(String factory_id) {
		this.factory_id = factory_id;
	}
	public String getDev_sn() {
		return dev_sn;
	}
	public void setDev_sn(String dev_sn) {
		this.dev_sn = dev_sn;
	}
	public String getSoftware_version() {
		return software_version;
	}
	public void setSoftware_version(String software_version) {
		this.software_version = software_version;
	}
	public String getCity_code() {
		return city_code;
	}
	public void setCity_code(String city_code) {
		this.city_code = city_code;
	}
	public String getCharger_ip() {
		return charger_ip;
	}
	public void setCharger_ip(String charger_ip) {
		this.charger_ip = charger_ip;
	}
	public Integer getConnect_type() {
		return connect_type;
	}
	public void setConnect_type(Integer connect_type) {
		this.connect_type = connect_type;
	}
	public Integer getEncrypt_type() {
		return encrypt_type;
	}
	public void setEncrypt_type(Integer encrypt_type) {
		this.encrypt_type = encrypt_type;
	}
	public String getComm_key() {
		return comm_key;
	}
	public void setComm_key(String comm_key) {
		this.comm_key = comm_key;
	}
	public Integer getActive_flag() {
		return active_flag;
	}
	public void setActive_flag(Integer active_flag) {
		this.active_flag = active_flag;
	}
	public String getSsid() {
		return ssid;
	}
	public void setSsid(String ssid) {
		this.ssid = ssid;
	}
	public String getProtocol_type() {
		return protocol_type;
	}
	public void setProtocol_type(String protocol_type) {
		this.protocol_type = protocol_type;
	}
	public String getProtocol_version() {
		return protocol_version;
	}
	public void setProtocol_version(String protocol_version) {
		this.protocol_version = protocol_version;
	}
	 
	public Integer getRate_schema_bespeak_fee() {
		return rate_schema_bespeak_fee;
	}
	public void setRate_schema_bespeak_fee(Integer rate_schema_bespeak_fee) {
		this.rate_schema_bespeak_fee = rate_schema_bespeak_fee;
	}
	public Integer getRate_schema_charge_fee() {
		return rate_schema_charge_fee;
	}
	public void setRate_schema_charge_fee(Integer rate_schema_charge_fee) {
		this.rate_schema_charge_fee = rate_schema_charge_fee;
	}
	public Integer getRate_schema_service_fee() {
		return rate_schema_service_fee;
	}
	public void setRate_schema_service_fee(Integer rate_schema_service_fee) {
		this.rate_schema_service_fee = rate_schema_service_fee;
	}
	public String getFee_oper_merchant_id() {
		return fee_oper_merchant_id;
	}
	public void setFee_oper_merchant_id(String fee_oper_merchant_id) {
		this.fee_oper_merchant_id = fee_oper_merchant_id;
	}
	public Integer getIs_allow_generate_fee() {
		return is_allow_generate_fee;
	}
	public void setIs_allow_generate_fee(Integer is_allow_generate_fee) {
		this.is_allow_generate_fee = is_allow_generate_fee;
	}
	public Date getCreate_time() {
		return create_time;
	}
	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}
	public String getCreate_oper_id() {
		return create_oper_id;
	}
	public void setCreate_oper_id(String create_oper_id) {
		this.create_oper_id = create_oper_id;
	}
	public Date getUpdate_time() {
		return update_time;
	}
	public void setUpdate_time(Date update_time) {
		this.update_time = update_time;
	}
	public String getUpdate_oper_id() {
		return update_oper_id;
	}
	public void setUpdate_oper_id(String update_oper_id) {
		this.update_oper_id = update_oper_id;
	}
	public Integer getValid_flag() {
		return valid_flag;
	}
	public void setValid_flag(Integer valid_flag) {
		this.valid_flag = valid_flag;
	}
	
	 public String getInstruction_set_no() {
		return instruction_set_no;
	}
	public void setInstruction_set_no(String instruction_set_no) {
		this.instruction_set_no = instruction_set_no;
	}
	
	public String getDevice_id() {
		return device_id;
	}
	public void setDevice_id(String device_id) {
		this.device_id = device_id;
	}
	public Integer getIs_allow_open() {
		return is_allow_open;
	}
	public void setIs_allow_open(Integer is_allow_open) {
		this.is_allow_open = is_allow_open;
	}
	public List<Integer> getPortStatusList() {
		return portStatusList;
	}
	public void setPortStatusList(List<Integer> portStatusList) {
		this.portStatusList = portStatusList;
	}
	
	public Integer getIs_parallel_charge() {
		return is_parallel_charge;
	}
	public void setIs_parallel_charge(Integer is_parallel_charge) {
		this.is_parallel_charge = is_parallel_charge;
	}
	
	public String getDistrict_name() {
		return district_name;
	}
	public void setDistrict_name(String district_name) {
		this.district_name = district_name;
	}
	
	public OmsDeviceType getDeviceType() {
		return deviceType;
	}
	public void setDeviceType(OmsDeviceType deviceType) {
		this.deviceType = deviceType;
	}
	
	@Override  
	    public Object clone() throws CloneNotSupportedException  
	    {  
	        return super.clone();  
	    }
	@Override
	public String toString() {
		return "OmsCharger [charger_id=" + charger_id + ", station_id=" + station_id + ", qr_code=" + qr_code
				+ ", charger_type=" + charger_type + ", port_quantity=" + port_quantity + ", port=" + port
				+ ", port_no=" + port_no + ", is_parallel_charge=" + is_parallel_charge + ", charge_port_type="
				+ charge_port_type + ", forward_srv_id=" + forward_srv_id + ", oper_merchant_id=" + oper_merchant_id
				+ ", entity_type=" + entity_type + ", entity_id=" + entity_id + ", wifi_ap=" + wifi_ap
				+ ", installation_time=" + installation_time + ", card_gprs=" + card_gprs + ", card_wifi=" + card_wifi
				+ ", serial_no=" + serial_no + ", factory_id=" + factory_id + ", device_id=" + device_id + ", dev_sn="
				+ dev_sn + ", software_version=" + software_version + ", instruction_set_no=" + instruction_set_no
				+ ", city_code=" + city_code + ", district_name=" + district_name + ", charger_ip=" + charger_ip
				+ ", connect_type=" + connect_type + ", encrypt_type=" + encrypt_type + ", comm_key=" + comm_key
				+ ", active_flag=" + active_flag + ", ssid=" + ssid + ", protocol_type=" + protocol_type
				+ ", protocol_version=" + protocol_version + ", rate_schema_bespeak_fee=" + rate_schema_bespeak_fee
				+ ", rate_schema_charge_fee=" + rate_schema_charge_fee + ", rate_schema_service_fee="
				+ rate_schema_service_fee + ", fee_oper_merchant_id=" + fee_oper_merchant_id
				+ ", is_allow_generate_fee=" + is_allow_generate_fee + ", is_allow_open=" + is_allow_open
				+ ", create_time=" + create_time + ", create_oper_id=" + create_oper_id + ", update_time=" + update_time
				+ ", update_oper_id=" + update_oper_id + ", valid_flag=" + valid_flag + ", charge_status="
				+ charge_status + ", charge_status_start_time=" + charge_status_start_time + ", offline_time="
				+ offline_time + ", user_pay_card=" + user_pay_card + ", error_msg=" + error_msg + ", portStatusList="
				+ portStatusList + ", splitratio_scheme_no=" + splitratio_scheme_no + ", factory_name=" + factory_name
				+ ", city_name=" + city_name + ", station_name=" + station_name + ", deviceType=" + deviceType
				+ ", bespeakRateList=" + bespeakRateList + ", chargeServiceRateList=" + chargeServiceRateList
				+ ", chargeRateList=" + chargeRateList + ", omsDicForwardSrvInfo=" + omsDicForwardSrvInfo
				+ ", omsSplitratioSchemeList=" + omsSplitratioSchemeList + ", omsDeviceType=" + omsDeviceType
				+ ", whitelist=" + whitelist + ", operName=" + operName + ", entityName=" + entityName + ", brand="
				+ brand + ", getBrand()=" + getBrand() + ", getOperName()=" + getOperName() + ", getEntityName()="
				+ getEntityName() + ", getOmsDicForwardSrvInfo()=" + getOmsDicForwardSrvInfo()
				+ ", getBespeakRateList()=" + getBespeakRateList() + ", getChargeServiceRateList()="
				+ getChargeServiceRateList() + ", getChargeRateList()=" + getChargeRateList()
				+ ", getOmsSplitratioSchemeList()=" + getOmsSplitratioSchemeList() + ", getOmsDeviceType()="
				+ getOmsDeviceType() + ", getWhitelist()=" + getWhitelist() + ", getFactory_name()=" + getFactory_name()
				+ ", getCity_name()=" + getCity_name() + ", getStation_name()=" + getStation_name()
				+ ", getSplitratio_scheme_no()=" + getSplitratio_scheme_no() + ", getOffline_time()="
				+ getOffline_time() + ", getCharge_status_start_time()=" + getCharge_status_start_time()
				+ ", getUser_pay_card()=" + getUser_pay_card() + ", getError_msg()=" + getError_msg()
				+ ", getCharge_status()=" + getCharge_status() + ", getCharger_id()=" + getCharger_id()
				+ ", getStation_id()=" + getStation_id() + ", getQr_code()=" + getQr_code() + ", getCharger_type()="
				+ getCharger_type() + ", getPort_quantity()=" + getPort_quantity() + ", getPort()=" + getPort()
				+ ", getPort_no()=" + getPort_no() + ", getCharge_port_type()=" + getCharge_port_type()
				+ ", getForward_srv_id()=" + getForward_srv_id() + ", getOper_merchant_id()=" + getOper_merchant_id()
				+ ", getEntity_type()=" + getEntity_type() + ", getEntity_id()=" + getEntity_id() + ", getWifi_ap()="
				+ getWifi_ap() + ", getInstallation_time()=" + getInstallation_time() + ", getCard_gprs()="
				+ getCard_gprs() + ", getCard_wifi()=" + getCard_wifi() + ", getSerial_no()=" + getSerial_no()
				+ ", getFactory_id()=" + getFactory_id() + ", getDev_sn()=" + getDev_sn() + ", getSoftware_version()="
				+ getSoftware_version() + ", getCity_code()=" + getCity_code() + ", getCharger_ip()=" + getCharger_ip()
				+ ", getConnect_type()=" + getConnect_type() + ", getEncrypt_type()=" + getEncrypt_type()
				+ ", getComm_key()=" + getComm_key() + ", getActive_flag()=" + getActive_flag() + ", getSsid()="
				+ getSsid() + ", getProtocol_type()=" + getProtocol_type() + ", getProtocol_version()="
				+ getProtocol_version() + ", getRate_schema_bespeak_fee()=" + getRate_schema_bespeak_fee()
				+ ", getRate_schema_charge_fee()=" + getRate_schema_charge_fee() + ", getRate_schema_service_fee()="
				+ getRate_schema_service_fee() + ", getFee_oper_merchant_id()=" + getFee_oper_merchant_id()
				+ ", getIs_allow_generate_fee()=" + getIs_allow_generate_fee() + ", getCreate_time()="
				+ getCreate_time() + ", getCreate_oper_id()=" + getCreate_oper_id() + ", getUpdate_time()="
				+ getUpdate_time() + ", getUpdate_oper_id()=" + getUpdate_oper_id() + ", getValid_flag()="
				+ getValid_flag() + ", getInstruction_set_no()=" + getInstruction_set_no() + ", getDevice_id()="
				+ getDevice_id() + ", getIs_allow_open()=" + getIs_allow_open() + ", getPortStatusList()="
				+ getPortStatusList() + ", getIs_parallel_charge()=" + getIs_parallel_charge() + ", getDistrict_name()="
				+ getDistrict_name() + ", getDeviceType()=" + getDeviceType() + ", getClass()=" + getClass()
				+ ", hashCode()=" + hashCode() + ", toString()=" + super.toString() + "]";
	}
	
}
